import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
Vue.use(ElementUI);
import JsonExcel from 'vue-json-excel'
Vue.component('downloadExcel', JsonExcel)
// require('script-loader!file-saver')
// require('script-loader!xlsx')

import 'element-ui/lib/theme-chalk/index.css';
// 导入全局样式
import './assets/css/public.css'
// 导入axios
import axios from 'axios';
// 配置请求根路径
axios.defaults.baseURL = "http://39.105.150.132:12000/"
// 配置请求拦截器
axios.interceptors.request.use(config => {
  config.headers.Authorization = sessionStorage.getItem("token")
  return config
})
Vue.prototype.$http = axios;
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App) 
}).$mount('#app')
